export interface DepartmentItem {
    id: number
    selfid: number
    dept_name: string
    pid: number
    childs: DepartmentItem[]
    type?:any
}

export interface DepartmentResponse {
    info_list: any
    code: string
    msg: string
    data: {
        info_list: Array<{
            selfid: number
            dept_name: string
            // ... 其他部门字段
        }>
    }
}

export interface AddDepartmentParams {
    pid: number
    dept_name: string
    selfid: number
}

export interface UpdateDepartmentParams {
    dept_name: string
    selfid: number
}

export interface DeleteDepartmentParams {
    selfid: number
}

export interface CommonResponse {
    msg: string
    code: string
    data?: any
}

// 部门返回的数据格式
export interface DepartmentResponse2 {
    childs?: unknown[] // 下级部门
    dept_name?: string // 部门名称
    employee_nums?: number // 员工数
    id?: number // ID
    pid?: number // 上级部门编号
    selfid?: number //编号
}
